import request from "@/utils/request";

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    url: "/api/system/ae/employees",
    method: "get",
    params,
  });
}

// 获取解密的手机号
export function getDecryptedPhone(id) {
  return request({
    url: `/api/system/ae/employees/${id}/decrypt-phone`,
    method: "get",
  });
}

// 添加员工
export function addEmployee(data) {
  return request({
    url: "/api/system/ae/employees",
    method: "post",
    data,
  });
}

// 更新员工信息
export function updateEmployee(data) {
  return request({
    url: `/api/system/ae/employees/${data.id}`,
    method: "put",
    data,
  });
}

// 删除员工
export function deleteEmployee(id) {
  return request({
    url: `/api/system/ae/employees/${id}`,
    method: "delete",
  });
}

// 启用员工
export function enableEmployee(id) {
  return request({
    url: `/api/system/ae/employees/${id}/enable`,
    method: "post",
  });
}

// 禁用员工
export function disableEmployee(id) {
  return request({
    url: `/api/system/ae/employees/${id}/disable`,
    method: "post",
  });
}
